#include "GLUTInputWrapper.h"
#include "GullEngine.h"

using namespace gull::core;
using namespace std;


void
keyBoardFunc(unsigned char key, int x, int y)
{
	InputAPI* api = theGullInputManager->getInputAPI();
	api->pressKey(key, x, y);
}


gullNotification
GLUTInputWrapper::initInputAPI()
{
	glutKeyboardFunc(keyBoardFunc);
	return GULL_OK;
	
}

void
nothingToDo()
{}

void
GLUTInputWrapper::pressKey(unsigned char key, int x, int y) const
{
	if(key == 27)//ESC
	{
		theGullEngine->stop();
		exit(0);
	}
	
}


void 
GLUTInputWrapper::releaseKey(unsigned char key, int x, int y) const
{
	
}